$OpenBSD: patch-apps_irssi_src_silc_core_client_ops_c,v 1.3 2010/07/31 12:43:25 sthen Exp $
--- apps/irssi/src/silc/core/client_ops.c.orig	Fri May 22 20:11:25 2009
+++ apps/irssi/src/silc/core/client_ops.c	Thu Jul 29 22:42:52 2010
@@ -262,10 +262,11 @@ int verify_message_signature(SilcClientEntry sender,
 				      sizeof(sender->fingerprint));
       if (strcmp(fingerprint, fingerprint2)) {
         /* since the public key differs from the senders public key, the
-           verification _failed_ */
+           verification won't be done */
         silc_pkcs_public_key_free(pk);
         silc_free(fingerprint);
-        ret = SILC_MSG_SIGNED_UNKNOWN;
+        silc_free(fingerprint2);
+        return SILC_MSG_SIGNED_UNKNOWN;
       }
       silc_free(fingerprint2);
     }
@@ -1069,6 +1070,8 @@ void silc_notify(SilcClient client, SilcClientConnecti
 
       nick = silc_nicklist_find(chanrec, client_entry2);
       if (nick != NULL) {
+	strlcpy(nick->prefixes, (mode & SILC_CHANNEL_UMODE_CHANOP) ? "@" : "",
+	  sizeof(nick->prefixes));
 	nick->op = (mode & SILC_CHANNEL_UMODE_CHANOP) != 0;
 	nick->founder = (mode & SILC_CHANNEL_UMODE_CHANFO) != 0;
 	signal_emit("nick mode changed", 2, chanrec, nick);
@@ -2790,6 +2793,15 @@ static void silc_get_auth_ask_passphrase(const unsigne
   silc_free(a);
 }
 
+static SERVER_SETUP_REC *silc_server_setup_find_port(const char *address,
+						     int port) {
+  SERVER_SETUP_REC *rec;
+
+  rec = server_setup_find(address, port, NULL);
+  return (rec == NULL || rec->port != port) ? NULL : rec;
+}
+
+
 /* Find authentication data by hostname and port. The hostname may be IP
    address as well.*/
 
@@ -2811,7 +2823,7 @@ void silc_get_auth_method(SilcClient client, SilcClien
 
   /* Check whether we find the password for this server in our
      configuration.  If it's set, always send it server. */
-  setup = server_setup_find_port(hostname, port);
+  setup = silc_server_setup_find_port(hostname, port);
   if (setup && setup->password) {
     completion(SILC_AUTH_PASSWORD, setup->password, strlen(setup->password),
 	       context);
